import request from '@/utils/request'

// 查询分期(延期)缴纳罚款决定书列表
export function listPenaltydeferralresult(query) {
  return request({
    url: 'ruoyi-system/penaltydeferralresult/list',
    method: 'get',
    params: query,
  })
}

// 查询分期(延期)缴纳罚款决定书详细
export function getPenaltydeferralresult(id) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/' + id,
    method: 'get',
  })
}

// 新增分期(延期)缴纳罚款决定书
export function addPenaltydeferralresult(data) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult',
    method: 'post',
    data: data,
  })
}

// 修改分期(延期)缴纳罚款决定书
export function updatePenaltydeferralresult(data) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult',
    method: 'put',
    data: data,
  })
}

// 删除分期(延期)缴纳罚款决定书
export function delPenaltydeferralresult(id) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/' + id,
    method: 'delete',
  })
}

// 导出决定书
export function exportPenaltydeferralresult(data) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 导出送达回证
export function exportPenaltydeferralresultReceipt(data) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/receipEexport',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 预览
export function previewPenaltydeferralresult(id) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/preview',
    method: 'get',
    params: { id },
  })
}

// 详情页预览
export function previewInquiryPdf(data) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/pdfPreview',
    method: 'post',
    data,
  })
}

export function addPenaltydeferralresultFiles(data) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/addFiles',
    method: 'post',
    data,
  })
}

// 获取立案登记列表
export function getCaseList() {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/caseList',
    method: 'get',
  })
}

// 根据立案号查询延期审批表字段
export function getDecisionsList(params) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/getContent',
    method: 'get',
    params,
  })
}

// 保存附件
export function addNoticedemandapprovalFiles(data) {
  return request({
    url: '/ruoyi-system/penaltydeferralresult/addFiles',
    method: 'post',
    data,
  })
}
